<!--
 * 用户详情模板
 * 作者：王勇程 (laughskydragon@qq.com)
-->
<div class="box">
    <div class="box-header with-border">
        <h3 class="box-title">用户详情</h3>
    </div>
    <div class="box-body">
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label>用户ID</label>
                    <p class="form-control-static">{$info.id|default='-'}</p>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label>昵称</label>
                    <p class="form-control-static">{$info.nickname|default='-'}</p>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label>手机号</label>
                    <p class="form-control-static">{$info.mobile|default='-'}</p>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label>VIP等级</label>
                    <p class="form-control-static">
                        {switch name="info.vip_level"}
                            {case value="0"}普通用户{/case}
                            {case value="1"}VIP月卡{/case}
                            {case value="2"}VIP季卡{/case}
                            {case value="3"}VIP年卡{/case}
                            {default /}未知
                        {/switch}
                    </p>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label>积分</label>
                    <p class="form-control-static">{$info.points|default=0}</p>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label>邀请码</label>
                    <p class="form-control-static">{$info.invite_code|default='-'}</p>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label>状态</label>
                    <p class="form-control-static">
                        {if condition="$info.status eq 1"}
                            <span class="label label-success">正常</span>
                        {else /}
                            <span class="label label-danger">禁用</span>
                        {/if}
                    </p>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label>注册时间</label>
                    <p class="form-control-static">{$info.create_time|date='Y-m-d H:i:s',###}</p>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label>头像</label>
                    <div>
                        {if condition="!empty($info.avatar)"}
                            <img src="{$info.avatar}" style="max-width: 100px; max-height: 100px;" alt="用户头像">
                        {else /}
                            <p class="form-control-static">暂无头像</p>
                        {/if}
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="box-footer">
        <a href="{:url('index')}" class="btn btn-default">返回列表</a>
        <a href="{:url('edit', ['id' => $info.id])}" class="btn btn-primary">编辑用户</a>
        <a href="{:url('balanceList', ['id' => $info.id])}" class="btn btn-info">余额流水</a>
        <a href="{:url('commissionList', ['id' => $info.id])}" class="btn btn-warning">佣金来源</a>
    </div>
</div>
